import random

def select_sort(seq):
    n=len(seq)
    for i in range(n-1):
        min_idx=i
        for j in range(i+1,n):
            if seq[j]<seq[min_idx]:
                min_idx=j
        if min_idx!=i:
            seq[i],seq[min_idx]=seq[min_idx],seq[i]

def test_select_sort():
    seq = list(range(10)) 
    random.shuffle(seq)  
    sorted_seq = sorted(seq)  
    select_sort(seq)
    assert seq == sorted_seq
    
test_select_sort()
